package com.example.hand.infra.mapper;

import com.example.hand.domain.entity.Employee;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;


import java.util.List;

@Mapper
public interface EmployeeMapper {

    /**
     * 查询全部
     * @param employee
     * @return
     */
    List<Employee> selectEmployeeList(Employee employee);

    /**
     * 通过id查询
     * @param employeeId
     * @return
     */
    Employee selectEmployeeById(@Param("employeeId")Long employeeId);

    /**
     * 添加
     * @param employee
     * @return
     */
    Employee insertEmployee(Employee employee);

    /**
     * 修改
     *
     * @param employee
     * @return
     */
    Employee updateEmployee(Employee employee);

    /**
     * 删除
     *
     * @param employeeId
     * @return
     */
    Employee deleteEmployee(Long employeeId);

    /**
     * 根据empId查询下属员工
     *
     * @param employeeId
     * @return
     */
    Employee getLeaderByEmployeeId(Employee employeeId);
}
